package com.zt.teacher.controller;

import com.zt.common.pojo.common.JsonResult;
import com.zt.common.pojo.origin.OriginCollege;
import com.zt.teacher.service.OriginCollegeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * description:
 * author:zt
 * date:2021-12-26
 */
@RestController
@CrossOrigin
@RequestMapping("originCollege")
@Api("学校学院模块")
public class OriginCollegeController {

    @Autowired
    private OriginCollegeService originCollegeService;

    @GetMapping("getAll")
    @ApiOperation("获取所有学校学院")
    public JsonResult<List<OriginCollege>> getAll(){
        return JsonResult.success(originCollegeService.getAll());
    }
}
